/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.mes.action.produce;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.mes.mapper.produce.DevFilesMapper;
public class DevFiles extends BaseAction
{
    @Autowired(required=false)
	private DevFilesMapper mapper;
    /**
    设备文件
    */
    
    public Map devFiles() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMSEL","'文档'");
        params.def("CMID9",-1);
        Object CMID9 =mapper.CMID9(params);
        result.put("CMID9", CMID9);
        
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_folder=mapper.s_folder(params);
        result.put("s_folder", s_folder);
        
        
        params.def("CMID9",-1);
        SQLList<SQLMap> s_file=mapper.s_file(params);
        result.put("s_file", s_file);
        
        
        SQLList<SQLMap> cate=mapper.cate(params);
        SQLMap cate_emt=cate.getExistfirst();
        result.put("cate", cate_emt);
        
        
        SQLList<SQLMap> s_tree_menu=mapper.s_tree_menu(params);
        result.put("s_tree_menu", s_tree_menu);
        
        return result;
    }
    /**
    增加新文件
    */
    
    public Map devFilesAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        result.put("file_admin", create_code(7,"file_num"));
        
        return result;
    }
    /**
    修改文件
    */
    
    public Map devFilesUp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> file_info=mapper.file_info(params);
        SQLMap file_info_emt=file_info.getExistfirst();
        result.put("file_info", file_info_emt);
        
        
        
        return result;
    }
    /**
    文件版本
    */
    
    public Map devFilesVersion() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_file_version=mapper.s_file_version(params);
        result.put("s_file_version", s_file_version);
        
        return result;
    }
    /**
    增加新文件修改
    */
    
    public Map devFilesAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int file_admin = mapper.file_admin(params);
        result.put("file_admin", file_admin);
        
        return result;
    }
}